package cn.stylefeng.guns.sys.modular.tao.mapper;

import cn.stylefeng.guns.sys.modular.tao.entity.Classification;
import cn.stylefeng.guns.sys.modular.tao.model.params.ClassificationParam;
import cn.stylefeng.guns.sys.modular.tao.model.result.ClassificationResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 分类管理表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2019-09-02
 */
@Repository
public interface ClassificationMapper extends BaseMapper<Classification> {

    /**
     * 获取列表
     *
     * @author 
     * @Date 2019-09-02
     */
    List<ClassificationResult> customList(@Param("paramCondition") ClassificationParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 
     * @Date 2019-09-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ClassificationParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 
     * @Date 2019-09-02
     */
    Page<ClassificationResult> customPageList(@Param("page") Page page, @Param("paramCondition") ClassificationParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author 
     * @Date 2019-09-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ClassificationParam paramCondition);

    List<Map<String, Object>> selectMenuTree(@Param("menuName") String menuName, @Param("level") String level);

    Integer adds(@Param("Data") ClassificationParam classificationParam);

    Classification getByName(@Param("name") String name);

    List<Classification> getParentName();

    List<Integer> getChildById(@Param("id") Integer id);

    List<Classification> getLevel2And();

    List<Classification> getMenu();

    List<Classification> getGoodsById(@Param("id") String id);

    List<Classification> getGoodsType(@Param("paramCondition") ClassificationParam param);
}
